How to stop PostgreSQL in linux?

Member

by rollin , in category: SQL , 2 years ago

How to stop PostgreSQL in linux?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by dmitrypro77 , 2 years ago

@rollin You can run the command below to stop postgresql serve in Linux:


1
sudo service postgresql stop


by edison.lang , a year ago

@rollin 

To stop PostgreSQL in Linux, follow these steps:

  1. Open a terminal window.
  2. Log in to PostgreSQL as the postgres user by typing the following command: sudo -u postgres psql
  3. Once you have logged in to PostgreSQL, type the following command to stop PostgreSQL: sudo systemctl stop postgresql If you are not using systemd, you can use the following command to stop PostgreSQL: sudo service postgresql stop
  4. PostgreSQL should now be stopped. You can verify this by typing the following command: sudo systemctl status postgresql If PostgreSQL is stopped, you should see a message indicating that the service is inactive and disabled.